# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
pkgname=kcharselect
pkgver=23.08.4
pkgrel=0
# armhf blocked by extra-cmake-modules
arch="all !armhf"
url="https://kde.org/applications/utilities/org.kde.kcharselect"
pkgdesc="A tool to select special characters from all installed fonts and copy them into the clipboard"
license="GPL-2.0-or-later"
makedepends="
	extra-cmake-modules
	kbookmarks5-dev
	kcrash5-dev
	kdoctools5-dev
	ki18n5-dev
	kwidgetsaddons5-dev
	kxmlgui5-dev
	qt5-qtbase-dev
	samurai
	"
_repo_url="https://invent.kde.org/utilities/kcharselect.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/kcharselect-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang"
options="!check" # No tests

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
3c586d1a2bff3af367d6912fa0985aad4029837324d5bde104f7505160817354adb8cb9ae814ab8c5d6bb16de79331484acb019820abc4f9e227db5955ac831a  kcharselect-23.08.4.tar.xz
"
